package com.sws.study.reflect;

/**
 *
 * Created by george on 6/20/15.
 * reference:http://www.iteye.com/topic/1123081
 */
public class Car {
    public Car(){

    }

    /**
     * 构造函数
     * @param brand
     * @param color
     * @param maxSpeed
     */
    public Car(String brand,String color,int maxSpeed){
        setBrand(brand);
        setColor(color);
        setMaxSpeed(maxSpeed);

    }
    public void introduce(){
        System.out.println(String.format("brand:%s ;color:%s;maxSpeed:%s",getBrand(),getColor(),getMaxSpeed()));
    }
    private String brand;
    private String color;
    private int maxSpeed;


    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public int getMaxSpeed() {
        return maxSpeed;
    }

    public void setMaxSpeed(int maxSpeed) {
        this.maxSpeed = maxSpeed;
    }
}
